import Button from "components/Base/Button";
import Icon from "components/Base/Icon";
import DataTable from "components/Base/DataTable";
import Image from "components/Base/Image";
import {drpStateDict} from "../../../../models/DrpState";

export default (self) => [

  {
    title: 'id',
    name: 'id',
    formItem: {
      type: 'hidden',
    }
  },

  {
    title: '用户id',
    name: 'serialNo',
    tableItem: {
    },
  },

  {
    title: '手机号',
    name: 'mobile',
    tableItem: {},
  },

  {
    title: '头像',
    name: 'avatarUrl',
    tableItem: {
      render: (text, record) => {
        return <Image src={text} style={{width: 50, height: 50}}/>
      }
    },
  },

  {
    title: '昵称/姓名',
    name: 'nickName',
    tableItem: {
    },
  },

  {
    title: '手机号',
    name: 'mobile',
    tableItem: {
    },
  },

  {
    title: "总佣金金额",
    name: 'totalReward',
    tableItem: {
      render: (text, record) => {
        return (
          <DataTable.Oper>
            <a onClick={e => {
              self.props.showRewardRecord(record.id);
            }}>
              <span>{text}</span>
            </a>
          </DataTable.Oper>
        );
      }
    },
  },


  {
    title: "账户余额",
    name: 'balance',
    tableItem: {},
  },

  {
    title: "提现到账佣金",
    name: 'cashOutTotal',
    tableItem: {},
  },

]
